FROM alpine:3

RUN sed -i "s/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g" /etc/apk/repositories

RUN apk add --update -t deps curl

RUN curl -L https://storage.googleapis.com/kubernetes-release/release/v1.23.9/bin/linux/amd64/kubectl -o /usr/local/bin/kubectl \
  && chmod +x /usr/local/bin/kubectl

RUN apk del --purge deps \
  && rm /var/cache/apk/*